package com.packet.cheng.service;

import com.packet.cheng.dto.RedPacketParamDTO;
import com.packet.cheng.entity.RedPacket;
import com.packet.cheng.entity.RedPacketRecord;
import com.packet.cheng.util.R;
import com.packet.cheng.vo.RedPacketReocrdVo;
import com.packet.cheng.vo.RedPacketVo;

import java.util.List;

/**
 * @author 张在成
 */
public interface RedPacketService {


    void   insertOrder();


    /**
     * 新增红包记录
     * @param redPacket
     * @return
     */
    R<?>  insertRedPacket(RedPacketParamDTO redPacket,String token) throws Exception;


    /**
     * 抢红包
     * @param id
     * @return
     */
    R<RedPacketVo> grabRedPacket(String token, Integer id) throws Exception;



    /**
     * 拆红包
     * @param id
     * @return
     */
    R<RedPacketReocrdVo>  apartRedPacket(String token, Integer id) throws Exception;




    /**
     * 查询红包id
     * @param redpacketId
     * @return 红包集合
     */
    R<List<RedPacketRecord>> selectRedPacket(String token, Integer redpacketId) throws Exception;
}
